<?php
namespace app\admin\model;


use app\model\Base;

class UserBank extends Base
{
    public function getStatusFormatAttr($value, $data)
    {
        $str = '';
        switch ($data['status']){
            case 'pending':
                $str = '审核中';
                break;
            case 'pass':
                $str = '已审核';
                break;
            case 'submit':
                $str = '已提交';
                break;
            case 'enabled':
                $str = '已启用';
                break;
            case 'disbaled':
                $str = '已禁用';
                break;
        }
        return $str;
    }

    public function userInfo()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }
}